package base;


import java.util.List;

import android.widget.BaseAdapter;



public abstract class MyBaseAdapter<ITEMBEANTYPE> extends BaseAdapter {

	private List<ITEMBEANTYPE> mDataSources;
	
	
	public MyBaseAdapter(List<ITEMBEANTYPE> mDatas) {
		super();
		this.mDataSources = mDatas;
	}

	@Override
	public int getCount() {
		if (mDataSources !=  null) {
			return mDataSources.size();
		}
		return 0;
	}

	@Override
	public Object getItem(int position) {
		if (mDataSources !=  null) {
			return mDataSources.get(position);
		}
		return null;
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	
}
